package ext.acae2.statements.bean;

@SuppressWarnings("rawtypes")
public class ComponentDetailBean implements Comparable {

	private String number;
	private String name;
	private String quantity;
	private String childPartNumber;
	private String childPartName;
	private String childQuantity;

	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getQuantity() {
		return quantity;
	}

	public void setQuantity(String quantity) {
		this.quantity = quantity;
	}

	public String getChildPartNumber() {
		return childPartNumber;
	}

	public void setChildPartNumber(String childPartNumber) {
		this.childPartNumber = childPartNumber;
	}

	public String getChildPartName() {
		return childPartName;
	}

	public void setChildPartName(String childPartName) {
		this.childPartName = childPartName;
	}

	public String getChildQuantity() {
		return childQuantity;
	}

	public void setChildQuantity(String childQuantity) {
		this.childQuantity = childQuantity;
	}
	
	@Override
	public int compareTo(Object arg0) {
		if(this.getNumber().equals(((ComponentDetailBean) arg0).getNumber())){
			return this.getChildPartNumber().compareTo(((ComponentDetailBean) arg0).getChildPartNumber());
		}else{
			return this.getNumber().compareTo(((ComponentDetailBean) arg0).getNumber());
		}
	}

}
